home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Tool Chest / Development Tools & Languages / Dylan Related / Mindy / Mindy 1.2 - portable sources / libraries / dylan / cmp.dylan < prev    next >
Encoding:
Text File  |  1995-03-15  |  1.7 KB  |  55 lines  |  [TEXT/ttxt]

  1. module: Dylan
  2. author: William Lott (wlott@cs.cmu.edu)
  3. rcs-header: $Header: cmp.dylan,v 1.6 94/10/03 14:00:35 nkramer Exp $
  4.  
  5. //======================================================================
  6. //
  7. // Copyright (c) 1994  Carnegie Mellon University
  8. // All rights reserved.
  9. // 
  10. // Use and copying of this software and preparation of derivative
  11. // works based on this software are permitted, including commercial
  12. // use, provided that the following conditions are observed:
  13. // 
  14. // 1. This copyright notice must be retained in full on any copies
  15. //    and on appropriate parts of any derivative works.
  16. // 2. Documentation (paper or online) accompanying any system that
  17. //    incorporates this software, or any part of it, must acknowledge
  18. //    the contribution of the Gwydion Project at Carnegie Mellon
  19. //    University.
  20. // 
  21. // This software is made available "as is".  Neither the authors nor
  22. // Carnegie Mellon University make any warranty about the software,
  23. // its performance, or its conformity to any specification.
  24. // 
  25. // Bug reports, questions, comments, and suggestions should be sent by
  26. // E-mail to the Internet address "gwydion-bugs@cs.cmu.edu".
  27. //
  28. //======================================================================
  29. //
  30. // This file contains the comparisons that arn't built in.
  31. //
  32.  
  33.  
  34. // Default methods for non-primitive compares.
  35.  
  36. define method \<= (x :: <object>, y :: <object>) => answer :: <boolean>;
  37.   ~(y < x);
  38. end method;
  39.  
  40.  
  41. define method \~= (x :: <object>, y :: <object>) => answer :: <boolean>;
  42.   ~(x = y);
  43. end method;
  44.  
  45.  
  46. define constant \>= 
  47.   = method (x :: <object>, y :: <object>)  => answer :: <boolean>;
  48.       ~(x < y);
  49.     end method;
  50.  
  51. define constant \> 
  52.   = method (x :: <object>, y :: <object>) => answer :: <boolean>;
  53.       y < x;
  54.     end method;
  55.